package pe.gob.mpfn.service;

import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pe.gob.mpfn.model.TablaMaestra;


@Service
@Transactional
public class TablaMaestraServiceImpl implements TablaMaestraService {

	public long countAllTablaMaestras() {
        return TablaMaestra.countTablaMaestras();
    }

	public void deleteTablaMaestra(TablaMaestra tablaMaestra) {
        tablaMaestra.remove();
    }

	public TablaMaestra findTablaMaestra(Integer id) {
        return TablaMaestra.findTablaMaestra(id);
    }

	public List<TablaMaestra> findAllTablaMaestras() {
        return TablaMaestra.findAllTablaMaestras();
    }

	public List<TablaMaestra> findTablaMaestraEntries(int firstResult, int maxResults) {
        return TablaMaestra.findTablaMaestraEntries(firstResult, maxResults);
    }

	public void saveTablaMaestra(TablaMaestra tablaMaestra) {
        tablaMaestra.persist();
    }

	public TablaMaestra updateTablaMaestra(TablaMaestra tablaMaestra) {
        return tablaMaestra.merge();
    }
}
